1. Field of the Invention
The present invention relates to organizing the storage of digitized images decoded according to an MPEG standard in view of their display.
2. Discussion of the Related Art
The MPEG standards set conditions for coding video images for their transmission in a compressed form. The coding according to an MPEG standard uses an estimate of motion within portions of a current image with respect to portions in one or two reference images. An image is divided into macroblocks of 16.times.16 pixels, to which the compression process defined by the MPEG standard is applied. On the decoder side, a flow of coded images is decompressed to be displayed.
The flow of coded images according to the MPEG standard includes three types of images. A first type of image is constituted by so-called "intra" images I which contain a coded current image. For its decoding, an "intra" image is self-sufficient. A second type of image is constituted by so-called "predicted" images P which require information relative to either a preceding "intra" or another "predicted" image in order to be decoded. A "predicted" image generally contains information relative to a difference between the current image and the preceding "intra" or "predicted" image. "Intra" images I and "predicted" images P are also called "anchor" images. A third type of image is constituted by so-called "bidirectional" images B which contain motion vectors of the current image with respect to the preceding and following "anchor" images on display.
Images I, P and B each includes a same number of decoded data enabling restoration of a whole image, should the need arise, by using a preceding and/or a following image.
To enable image display, each image, once decoded, is stored in a memory area associated with the type of image to which it corresponds. In fact, the bidirectional images B are assigned a memory area and the "intra" images I or the "predicted" images P are indifferently assigned two other memory areas, since they each play a similar role in the decoding of a bidirectional image. The three conventional memory areas have identical sizes. Each memory area is written into according to a decoding flow recording the decoded images to be displayed and is read from according to a display flow corresponding to the flow of original images prior to the coding all according to the MPEG standard.
FIG. 1 shows an example of decoding and display flows DEC and DISP, respectively, according to a vertical synchronization signal Vsync, the images being decoded and displayed according to an up-down line scanning.
A first image is constituted by an "intra" image I0 which, once decoded, is stored in a first memory area assigned to the "anchor" images. The time assigned to the decoding and the storage of an image is the display time of an image. The storage of image I0 begins at a time t0 and lasts for two vertical scanning periods, since the display generally happens in an interlaced fashion. The image which follows image I0 in flow DEC is a "predicted" image P3, the decoding of which requires information contained in image I0 . Image P3 is recorded, in a second memory area for "anchor" images, for two vertical scanning periods (between times t2 and t4).
The display occurs in an interlaced fashion, that is, as far as the display is concerned, an image is divided into two fields, respectively even and odd, the even field containing the even lines of the image and the odd field containing the odd lines of the image. The even and odd fields are commonly designated as, respectively, "bottom" and "top".
The display of the first image (intra image I0 ) is synchronized on a time t3 which corresponds to the vertical synchronization pulse included between times t2 and t4. The display of image I0 ends at a time t5 which corresponds to the vertical synchronization pulse which follows time t4. In fact, the first field (generally the odd field I0t) of I0 is displayed between times t3 and t4, the second field (generally the even field I0b) is displayed between times t4 and t5.
In the example shown, the image to be displayed after image I0 is a bidirectional image B1. This image is stored in a third memory area assigned to bidirectional images at time t4. Indeed, the decoding of bidirectional image B1 requires the prior decoding of two "anchor" images (here, images I0 and P3). Since the display happens in an interlaced fashion, the display of the first field B1t of image B1 can start as soon as half this image has been decoded and stored in the corresponding memory area.
Image B1 is followed by a bidirectional image B2 which is stored in the third memory area between times t6 and t8. As shown at time t6, a first half (field B1t) of image B1 has been displayed, the displaying of the second field B1b of image B1 progressively and completely freeing the third memory area. The memory words of image B2 are then written over the memory words of image B1 in the third memory area which are no longer useful. After displaying image B2, image P3, which is extracted from the second memory area, is displayed. Between times t8 and t10, a "predicted" image P6 is stored in the first memory area by writing over "intra" image I0 which is of no more use. Indeed, "predicted" image P6 is decoded based on the preceding "anchor" image, that is, the "predicted" image P3 contained in the second memory area, and bidirectional images B4 and B5 which follow in flow DEC and which are to be displayed before image P6 will be decoded by means of the preceding and following "anchor" images, that is, images P3 and P6.
The different order of the images in the flows DEC and DISP results for the MPEG standards that provide that the coding of a bidirectional image (B) uses a first former anchor image (I or P) and a second following anchor image (I or P). In the flow DEC, the bidirectional image is accordingly subsequent to the second anchor image for the decoding while it must be displayed prior to this second anchor image.
FIG. 2 illustrates a conventional example of organization of a memory area for a bidirectional image. Six blocks of eight words of eight bytes of digital data (decoded) are generally associated with each macroblock of 16.times.16 pixels of an image. Four blocks Y1, Y2, Y3 and Y4 of 8.times.8 pixels contain information relative to the luminance of each pixel. Two blocks U and V of 8.times.8 pixels contain information relative to chrominance, a word of a block U or V being used for eight pixels. The storage of the information of an image macroblock thus occupies six memory word blocks.
A memory area is divided into two sectors, respectively S1 and S2, generally contiguous as concerns the addresses. Sector S1 contains the blocks Y of the macroblocks and sector S2 contains the blocks U and V of the macroblocks. The macroblocks are stored sequentially according to a vertical (up-down) and horizontal (left-right) scanning of the image, in each area S1 or S2, that is, a position of a given macroblock, in the memory area, is the same whatever the image to which it belongs.
FIGS. 3A and 3B illustrate the difference between the decoding flows of a bidirectional image according to two cases of the MPEG standards. FIG. 3A shows decoding and display flows DEC and DISP, respectively, according to signal Vsync and to a synchronization signal Dsync, in the case where decoding flow DEC represents interlaced images (MPEG1 standard or so-called "frame structure" images in the MPEG2 standard). FIG. 3B shows a decoding flow DEC where the images have been non-interlaced before the coding (so-called "field structure" images in the MPEG2 standard).
In both cases, the image display is performed in an interlaced fashion, that is, the display flow DISP is the same. As concerns the display, a bidirectional image Bn is divided into two fields, respectively even bn and odd tn.
If the decoding flow DEC is interlaced (FIG. 3A), the images are stored sequentially as has been discussed in relation with FIG. 2 and the read addressing in the memory area is such that the odd lines are extracted before the even lines. This enables starting the decoding and the storing of an image, for example Bn+1 (time t11), as soon as the display of the even field bn of the preceding image Bn starts.
In the case where the decoding flow is non-interlaced (FIG. 3B), the storage occurs sequentially with respect to the data flow, that is, the odd field tn of an image Bn is stored before the even field bn. Thus, it is possible to start the storage of a following bidirectional image as soon as half (the odd field) of the preceding bidirectional image has been displayed. In a non-interlaced decoding flow DEC, the images are also divided into macroblocks corresponding to six memory blocks, but only decode data relative to lines of the same type (even or odd) that correspond to a given macroblock.